﻿using System;
using System.ComponentModel;
using System.Globalization;
using System.Windows.Forms;
using ZoneFiveSoftware.Common.Visuals;

#if DEBUG

namespace STCommon.NUnit
{
    class NUnitRunnerView : IView
    {
#region IView Members

        public System.Collections.Generic.IList<IAction> Actions
        {
            get { return null; }
        }

        public Guid Id
        {
            get { return GUIDs.NUnitRunnerView; }
        }

        public string SubTitle
        {
            get { return null; }
        }

        public void SubTitleClicked(System.Drawing.Rectangle subTitleRect)
        {
        }

        public bool SubTitleHyperlink
        {
            get { return false; }
        }

        public string TasksHeading
        {
            get { return null; }
        }

#endregion

#region IDialogPage Members

        public Control CreatePageControl()
        {
            if (m_Control == null)
            {
                m_Control = new NUnitRunnerControl();
            }

            return m_Control;
        }

        public bool HidePage()
        {
            return true;
        }

        public string PageName
        {
            get { return "NUnit Runner"; }
        }

        public void ShowPage(string bookmark)
        {
        }

        public IPageStatus Status
        {
            get { return null; }
        }

        public void ThemeChanged(ITheme visualTheme)
        {
            if (m_Control != null)
            {
                m_Control.ThemeChanged(visualTheme);
            }
        }

        public string Title
        {
            get { return "NUnit Runner"; }
        }

        public void UICultureChanged(CultureInfo culture)
        {
            if(m_Control != null)
            {
                m_Control.UICultureChanged(culture);
            }
        }

#endregion

#region INotifyPropertyChanged Members

        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;

#endregion

        public void UpdateActions()
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs("Actions"));
            }
        }

        private NUnitRunnerControl m_Control = null;
    }
}

#endif